/**
 * Copyright (c) 2020-2021 ThunderSoft
 * All Rights Reserved by Thunder Software Technology Co., Ltd and its affiliates.
 * You may not use, copy, distribute, modify, transmit in any form this file
 * except in compliance with ThunderSoft in writing by applicable law.
 *
 */
/**
 * @file    hal_iot_flash.c
 * @brief   hal flash funtion 
 * @details hal flash funtion
 * @version 1.0
 * @author  Hu lei
 * @date    2021-03-05
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2021-03-05               Hu lei              Create it.
 *
 */

#include "iot_errno.h"
#include "iot_flash.h"
#include <bl602_romdriver.h>
#include "bl_flash.h"

#define USER_UNUSED(a) ((void)(a))
unsigned int IoTFlashRead(unsigned int flashOffset, unsigned int size, unsigned char *ramData)
{
    USER_UNUSED(flashOffset);
    USER_UNUSED(size);
    USER_UNUSED(ramData);

    return IOT_SUCCESS;
}

unsigned int IoTFlashWrite(unsigned int flashOffset, unsigned int size,
                           const unsigned char *ramData, unsigned char doErase)
{
    USER_UNUSED(flashOffset);
    USER_UNUSED(size);
    USER_UNUSED(ramData);
    USER_UNUSED(doErase);

    return IOT_SUCCESS;
}

unsigned int IoTFlashErase(unsigned int flashOffset, unsigned int size)
{
    USER_UNUSED(flashOffset);
    USER_UNUSED(size);

    return IOT_SUCCESS;
}

unsigned int IoTFlashInit(void)
{
    return IOT_SUCCESS;
}

unsigned int IoTFlashDeinit(void)
{
    return IOT_SUCCESS;
}
